#include <iostream>
#include <vector>
#include <string>

void sparseStr(std::string str, std::vector<std::string> &str_vec)
{
    int i = 0;
    while (i < str.size())
    {
        while (i < str.size() && str[i] == '_')
        {
            i++;
        }

        std::string tmp_str;
        if (str[i] == '"')
        {
            tmp_str.push_back(str[i]);
            i++;
            while (i < str.size() && str[i] != '"')
            {
                tmp_str.push_back(str[i]);
                i++;
            }
            tmp_str.push_back(str[i]);
            i++;
        }
        else
        {
            while (i < str.size() && str[i] != '_')
            {
                tmp_str.push_back(str[i]);
                i++;
            }
        }

        if (tmp_str.empty())
            continue;
        str_vec.push_back(tmp_str);
    }
}

int main()
{
    int k;
    std::cin >> k;
    std::string str;
    std::cin >> str;

    std::vector<std::string> str_vec;
    sparseStr(str, str_vec);
    if (k >= str_vec.size())
    {
        std::cout << "ERROR" << std::endl;
        return 0;
    }
    else
    {
        str_vec[k] = "******";
        for (int i = 0; i < str_vec.size() - 1; i++)
        {
            std::cout << str_vec[i] << "_";
        }
        std::cout << str_vec.back() << std::endl;

        return 0;
    }
}